package com.ff.discounts.component.saleorder

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.ff.discounts.component.order.OrderFragment
import com.ff.discounts.component.tab.home.HistoryData
import com.ff.discounts.library.log.HiLog

/**
 * 订单页面适配器
 * @author: fufang
 * @date: 2023/11/2
 */
class OrderPageAdapter(fragmentActivity: FragmentActivity,private val datum:List<HistoryData>):
        FragmentStateAdapter(fragmentActivity){
    override fun getItemCount(): Int {
        return datum.size
    }

    override fun createFragment(position: Int): Fragment {
        HiLog.d(position)
        return OrderFragment.newInstance(position)
    }

}
